@model MvcCms.Data.ContentComment

@Html.ValidationSummary("Edit was unsuccessful. Please correct the errors and try again.") 

@using (Html.BeginForm())
{
<p>
    <label for="AddedByIP">
        AddedByIP:</label>
    @Html.TextBox("AddedByIP", null, new { @readonly = "readonly" }) 
</p>
<p>
    <label for="Body">
        Body:</label>
    @Html.TextArea("Body", Model.Body, new { @class="editcomment-ta" })
</p>
    if (Model.User.UserName == "anonymous")
    { 
        <p>
            <label for="AddedByAnonEmail">
                AddedByAnonEmail:</label>
            @Html.TextBox("AddedByAnonEmail", Model.AddedByAnonEmail)  
        </p>
        <p>
            <label for="AddedByAnonName">
                AddedByAnonName:</label>
            @Html.TextBox("AddedByAnonName", Model.AddedByAnonName) 
        </p>
    }
    else
    { 
        <p>
            <label for="UserName">
                AddedBy UserName:</label>
            @Html.TextBox("User.UserName", null, new { @readonly = "readonly" })
        </p>
        <p>
            <label for="UserName">
                AddedBy Email:</label>
            @Html.TextBox("User.Email", null, new { @readonly = "readonly" })
        </p>
    } 
    <p>
        <label for="Approved">
            Approved:</label>
        @Html.CheckBox("Approved", Model.Approved) 
    </p>
    <p>
        <input type="hidden" id="commentid" value="@Model.CommentID" />
        <input type="button" onclick="javascript: EditComment()" id="updateBut" value="Edit" />
    </p>
} 
